import {get,post} from '@/utils/https'
import type {RowType} from '@/type/station'
interface ListType{
    id?:string,
    name?:string,
    page:number,
    pageSize:number,
    status:number
}
interface RevenueData{
    name?:string,
    page:number,
    pageSize:number
}
const API = {
    StationList:'/stationList',
    Edit:'/station/edit',
    Delete:'/station/delete',
    Revenue:'/revenueChart',
    RevenueList:'/revenueList',
    CurrentList:"/currentList"
}
// Monitor模块
export function getStationListAPI(data:ListType){
    return post(API.StationList,data)
}

export function editStationAPI(data:RowType){
    return post(API.Edit,data)
}
export function DeleteAPI(id:string){
    return post(API.Delete,{id})
}
// Revenue模块
export function getRevenueChartAPI(){
    return get(API.Revenue)
}
export function getRevenueListAPI(data:RevenueData){
    return post(API.RevenueList,data)
}
export function getCurrentListAPI(){
    return post(API.CurrentList)
}